//
//  NSString+BVideoCache.h
//  Bullet
//
//  Created by  on 2019/9/19.
//  Copyright © 2019 . All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSString (BVideoCache)

- (NSDate *)stringToDate:(NSString *)formate;

/// 数字字符串转为以k,w为单位的短字符串
- (NSString *)stringToShortNumber;

/// 修复NSTextCheckingResult返回httpsrange不正确的bug
/// @param match match
- (NSRange)fixLinkRangeWithMatch:(NSTextCheckingResult *)match;

/// 获取字体宽高
/// @param font 字体大小
/// @param fitSize 最大区域
- (CGSize)sizeWithFont:(UIFont *)font fitSize:(CGSize)fitSize;

- (BOOL)isNumberStr;

/// 用于url请求 utf8转码
- (NSString *)urlUtf8EncodeStr;

/// 是否为可用标题,仅包含字母数字中文
- (BOOL)isValidateTitleStr;

///  判断是否包含表情
- (BOOL)containsEmoji;

+ (NSString *)hexStringWithData:(NSData *)data;

/// 秒转00:00格式字符串
/// @param seconds 时间
+ (NSString *)secondsToTimeStr:(NSInteger)seconds;

/// 内存大小转k M字符串
/// @param size 大小  
+ (NSString *)memerySizeStrWithSize:(long long)size;

@end

NS_ASSUME_NONNULL_END
